<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <!--{include file='comm/header.tpl'}-->
    <title><!--{$company_short_name}-->电商平台</title>
    <!--{include file='comm/comm_cal.tpl'}-->
</head>
<body>
<!--{include file='comm/naviBanner.tpl'}-->
<div class="container">
    <!--{include file='comm/menu.tpl'}-->
    <div class="comm_crub">
        <span class="now_crub">订单物流</span>
    </div>
    <div class="comm_content">
            <div class="search-box">
                <div style="position:relative">
                    <form id="search_form" name="search_form" onsubmit="return false;"  method="POST">
                        <table>
                            <tbody>
                            <tr>
                                <td>
                                	<span>
                                        渠道：<select class="clear_search" style="width: 106px;" id="channel" name="channel">
	                                            <option value="">请选择</option>
												<!--{foreach from=$channel item=c_l}-->
													<option value="<!--{$c_l->channelID}-->" <!--{if $c_l->channelID==$channelID}-->selected<!--{/if}-->><!--{$c_l->channelName}--></option>
												<!--{/foreach}-->
	                                        </select>
                                    </span>
                                    <span>订单号：<input type="text" value="" style="width:180px;" name="bill_no"  id="bill_no" /></span>
                                    <span>
                                        订单来源：<select class="clear_search" style="width: 106px;" name="billType">
                                            <option value="">请选择</option>
                                            <option value="1">B2C商城</option>
                                            <option value="2">天猫商城</option>
                                            <option value="3">京东商城</option>
                                            <option value="4">1号店</option>
                                            <option value="5">QQ网购</option>
                                            <option value="6">凡客</option>
                                            <option value="7">苏宁易购</option>
                                            <option value="8">实体店</option>
                                            <option value="9">补货单</option>
                                            <option value="10">换货单</option>
                                            <option value="13">当当网</option>
                                        </select>
                                    </span>
                                   
                                    <span>收货人：<input type="text" value="" size="10" name="deliver_name" id="deliver_name"  /></span>
                                    <span>手机号码：<input type="text" value="" size="10" name="deliver_mobile" id="deliver_mobile" /></span>
                                    <span>
                                        物流状态：<select class="clear_search" style="width: 106px;" id="freight_state" name="freight_state">
                                            <option value="">请选择</option>
                                            <option value="1" <!--{if $freight_state==1}-->selected<!--{/if}-->>无流转</option>
                                            <option value="2" <!--{if $freight_state==2}-->selected<!--{/if}-->>待收</option>
                                            <option value="3" <!--{if $freight_state==3}-->selected<!--{/if}-->>异常</option>
                                            <option value="4" <!--{if $freight_state==4}-->selected<!--{/if}-->>拒收</option>
                                        </select>
                                    </span>
                                    <span>快递公司：<input type="text" value="" size="10" name="company_name" id="company_name" /></span>
                                    <span>快递单号：<input type="text" value="" size="10" name="freight_bill_no" id="freight_bill_no" /></span>
                                    <span><input type="button" value="查询" class="btn" onclick="bill.search();" />
                                    <input type="button" value="导出" class="btn" onclick="bill.exportBill();" /></span>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </form>
                </div>
            </div>
            <table id="flex" style="display:none"></table>
        </div>
    
</div>

<script type="text/javascript">
    $("#flex").flexigrid({
        url:"/invokingAjax-backend/bill/billWarning.ajax?operFlg=1",
        dataType: "json",
        colModel : [
            {display: "订单号", name : "bill_no", width : 130, sortable : true},
            {display: "订单来源", width : 100},
            {display: "收货人", width : 100},
            {display: "手机号码", width : 100},
            {display: "收货地址", width : 250},
            {display: "快递公司", width : 100},
            {display: "快递单号", width : 100},
            {display: "物流状态", width : 100},
            {display: "异常原因", width : 250}
        ],
        sortname : "bw.freight_company_name",
        sortorder: "desc",
        usepager: true,
        rp: 10,
        useRp: true,
        showTableToggleBtn: true,
        autoload: true,
        onSubmit: function() {
            var dt = $('#search_form').serializeArray();
            $("#flex").flexOptions({params: dt});
            return true;
        }
    });

    var bill = {
        search: function() {
            var dt = $("#search_form").serializeArray();
            $("#flex").flexOptions({params: dt}).flexReload();
        },

        load: function() {
            $("#flex").flexReload();
        },
       	exportBill : function () {
			$("#search_form").attr("action" , "/quanliadmin/app/bill/billWarning.pscript?operFlg=2") ;
			document.search_form.submit() ;
       	}

    };

</script>

</body>
</html>